/*
 * 句組...隨意了v0.1
 * @author @bonex2 
 */
package main;

import java.sql.Time;

public class SentencePair {

	private String sentence;
	private long id = -1;
	private Time lastUpdate;

	public SentencePair() {

	}

	public SentencePair(String sentence) {
		super();
		setSentence(sentence);
	}

	public SentencePair(SentencePair sp) {
		super();
		if (sp == null) {
			this.id = -1;
			this.lastUpdate = null;
			this.sentence = null;
		} else {
			this.id = sp.id;
			this.lastUpdate = sp.lastUpdate;
			this.sentence = sp.sentence;
		}
	}

	public String getSentence() {
		return sentence;
	}

	public void setSentence(String sentence) {
		this.sentence = sentence;
	}

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public Time getLastUpdate() {
		return lastUpdate;
	}

	public void setLastUpdate(Time lastUpdate) {
		this.lastUpdate = lastUpdate;
	}

	public boolean isNull() {
		return (id == -1);
	}

	public String toString() {
		return (this.sentence == null) ? (this.id + " : null") : (this.id
				+ " : " + this.sentence);
	}
}
